home *** CD-ROM | disk | FTP | other *** search
/ DigitalVision: Spaced Out / DigitalVision: Spaced Out - Disc 1.iso / pc / data / images.dxr / Internal_22_cd search result button.ls < prev    next >
Encoding:
Text File  |  2001-10-22  |  953 b   |  44 lines

  1. property pActive, pspritenum, pCdname, pCDcode
  2.  
  3. on beginSprite me
  4.   pspritenum = me.spriteNum
  5.   deactivate()
  6. end
  7.  
  8. on initCDButton me, cdCode, CDname
  9.   pCDcode = cdCode
  10.   pCdname = CDname
  11.   sprite(pspritenum).member = CDname & " cover"
  12.   activate()
  13. end
  14.  
  15. on mouseUp me
  16.   if pActive then
  17.     resultList = dbSearch("cd_code", pCDcode)
  18.     if resultList <> EMPTY then
  19.       imageResultList = utilsConvertToImageList(resultList)
  20.       castLib("CDImages").fileName = swapChar(the pathname & "casts/" & pCdname & getCastExt(), "/", getPathDelim())
  21.       utilsSaveState(#cdsearch, #cdCode, pCDcode)
  22.       utilsSaveState(#cdsearch, #CDname, pCdname)
  23.       utilsSaveState(#cdsearch, #imageCode, VOID)
  24.       localJumpToThumbnails(#cdsearch, imageResultList)
  25.     else
  26.       member("error message").text = "No images were found for this CD"
  27.     end if
  28.   end if
  29. end
  30.  
  31. on activate me
  32.   pActive = 1
  33. end
  34.  
  35. on deactivate me
  36.   pActive = 0
  37. end
  38.  
  39. on show me
  40. end
  41.  
  42. on hide me
  43. end
  44.